package com.amos.muexamclient.sys.service.dto;


import com.alibaba.fastjson.JSONObject;
import com.amos.core.PageDTO;
import com.amos.muexamclient.sys.entity.SysJobEntity;
import com.amos.muexamcore.core.MuEntity;
import com.amos.muexamcore.core.MuField;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * Copyright © 2018 五月工作室. All rights reserved.
 *
 * @Package com.amos.muexamclient.service.dto
 * @ClassName SysJobDTO
 * @Description TODO
 * @Author Amos
 * @Modifier
 * @Date 2020-03-24 14:34:37
 * @Version 1.0
 **/
@MuEntity(table = "sys_job", entity = SysJobEntity.class)
@Data
public class SysJobDTO extends PageDTO implements Serializable {

    private static final long serialVersionUID = 1206789483064757861L;
    @MuField(remark = "任务名称", type = "varchar", length = 64, column = "job_name")
    private String jobName;

    @MuField(remark = "任务组名", type = "varchar", length = 64, column = "job_group")
    private String jobGroup;

    @MuField(remark = "调用目标字符串", type = "varchar", length = 500, column = "invoke_target")
    private String invokeTarget;

    @MuField(remark = "cron执行表达式", type = "varchar", length = 255, column = "cron_expression")
    private String cronExpression;

    @MuField(remark = "计划执行错误策略（1立即执行 2执行一次 3放弃执行）", type = "varchar", length = 20, column = "misfire_policy")
    private String misfirePolicy;

    @MuField(remark = "是否并发执行（0允许 1禁止）", type = "char", length = 1, column = "concurrent")
    private String concurrent;

    @MuField(remark = "状态（0正常 1暂停）", type = "char", length = 1, column = "status")
    private String status;

    @MuField(remark = "创建者", type = "varchar", length = 64, column = "create_by")
    private String createBy;

    @MuField(remark = "更新者", type = "varchar", length = 64, column = "update_by")
    private String updateBy;

    @MuField(remark = "更新时间", type = "datetime", column = "update_time")
    private Date updateTime;

    @MuField(remark = "备注信息", type = "varchar", length = 500, column = "remark")
    private String remark;

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }
}
